import {
  lockRelease,
  userInfo,
  userInfoChange,
  politicsGetCodeList,
  logonLogInformation,
  operationInformation,
  abnormalInformation,
  smsMessage,
  addressBookInformationCr,
  addressBookInformationTjgx,
  addressBookInformationNum,
  addressBookInformationRemove,
  addressBookInformationRemoveAll,
  addressBookInformationSelect,
  addressBookInformationGx,
  mailMessage
} from '@/api/platformManage/index'
//  图片管理
const pictuerManage = {

  actions: {
    // 账户锁定解除
    LockRelease({
      commit
    }, postselectinfo) {
      return new Promise((resolve, reject) => {
        lockRelease(postselectinfo).then(response => {
          resolve(response.data)
        }).catch(error => {
          reject(error)
        })
      })
    },
    // 用户个人信息
    UserInfo({
      commit
    }, postselectinfo) {
      return new Promise((resolve, reject) => {
        userInfo(postselectinfo).then(response => {
          resolve(response.data)
        }).catch(error => {
          reject(error)
        })
      })
    },
    // 用户个人信息修改
    UserInfoChange({
      commit
    }, postselectinfo) {
      return new Promise((resolve, reject) => {
        userInfoChange(postselectinfo).then(response => {
          resolve(response.data)
        }).catch(error => {
          reject(error)
        })
      })
    },
    // 政治面貌码表
    PoliticsGetCodeList({
      commit
    }, postselectinfo) {
      return new Promise((resolve, reject) => {
        politicsGetCodeList(postselectinfo).then(response => {
          resolve(response.data)
        }).catch(error => {
          reject(error)
        })
      })
    },
    // 平台登录日志信息
    LogonLogInformation({
      commit
    }, postselectinfo) {
      return new Promise((resolve, reject) => {
        logonLogInformation(postselectinfo).then(response => {
          resolve(response.data)
        }).catch(error => {
          reject(error)
        })
      })
    },
    // 平台操作日志信息
    OperationInformation({
      commit
    }, postselectinfo) {
      return new Promise((resolve, reject) => {
        operationInformation(postselectinfo).then(response => {
          resolve(response.data)
        }).catch(error => {
          reject(error)
        })
      })
    },
    // 平台异常日志信息
    AbnormalInformation({
      commit
    }, postselectinfo) {
      return new Promise((resolve, reject) => {
        abnormalInformation(postselectinfo).then(response => {
          resolve(response.data)
        }).catch(error => {
          reject(error)
        })
      })
    },
    // 平台短信发送日志信息
    SmsMessage({
      commit
    }, postselectinfo) {
      return new Promise((resolve, reject) => {
        smsMessage(postselectinfo).then(response => {
          resolve(response.data)
        }).catch(error => {
          reject(error)
        })
      })
    },
    // 平台邮件发送日志信息
    MailMessage({
      commit
    }, postselectinfo) {
      return new Promise((resolve, reject) => {
        mailMessage(postselectinfo).then(response => {
          resolve(response.data)
        }).catch(error => {
          reject(error)
        })
      })
    },
    // 平台通讯录信息 - 插入
    AddressBookInformationCr({
      commit
    }, postselectinfo) {
      return new Promise((resolve, reject) => {
        addressBookInformationCr(postselectinfo).then(response => {
          resolve(response.data)
        }).catch(error => {
          reject(error)
        })
      })
    },
    // 平台通讯录信息 - 条件更新
    AddressBookInformationTjgx({
      commit
    }, postselectinfo) {
      return new Promise((resolve, reject) => {
        addressBookInformationTjgx(postselectinfo).then(response => {
          resolve(response.data)
        }).catch(error => {
          reject(error)
        })
      })
    },
    // 平台通讯录信息 - 件数
    AddressBookInformationNum({
      commit
    }, postselectinfo) {
      return new Promise((resolve, reject) => {
        addressBookInformationNum(postselectinfo).then(response => {
          resolve(response.data)
        }).catch(error => {
          reject(error)
        })
      })
    },
    // 平台通讯录信息 - 强制删除
    AddressBookInformationRemove({
      commit
    }, postselectinfo) {
      return new Promise((resolve, reject) => {
        addressBookInformationRemove(postselectinfo).then(response => {
          resolve(response.data)
        }).catch(error => {
          reject(error)
        })
      })
    },
    // 平台通讯录信息 - 强制删除(all)
    AddressBookInformationRemoveAll({
      commit
    }, postselectinfo) {
      return new Promise((resolve, reject) => {
        addressBookInformationRemoveAll(postselectinfo).then(response => {
          resolve(response.data)
        }).catch(error => {
          reject(error)
        })
      })
    },
    // 平台通讯录信息 - 检索
    AddressBookInformationSelect({
      commit
    }, postselectinfo) {
      return new Promise((resolve, reject) => {
        addressBookInformationSelect(postselectinfo).then(response => {
          resolve(response.data)
        }).catch(error => {
          reject(error)
        })
      })
    },
    // 平台通讯录信息 - 更新
    AddressBookInformationGx({
      commit
    }, postselectinfo) {
      return new Promise((resolve, reject) => {
        addressBookInformationGx(postselectinfo).then(response => {
          resolve(response.data)
        }).catch(error => {
          reject(error)
        })
      })
    }

  }
}

export default pictuerManage
